package com.isxcode.link.template.service;

import com.isxcode.link.common.pojo.LinkResponse;
import com.isxcode.link.common.template.LinkEventHandler;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

@Slf4j
@Service
public class LinkEventReceiveService implements LinkEventHandler {

    @Override
    public void queryResultEvent(String executeId, LinkResponse linkResponse) {

        log.info("执行id:" + executeId + "获得返回结果:" + linkResponse);
    }

    @Override
    public void stateChangedEvent(String executeId, LinkResponse linkResponse) {
        log.info("执行id:" + executeId + "当前状态:" + linkResponse);
    }

    @Override
    public void infoChangedEvent(String executeId, LinkResponse linkResponse) {
        log.info("执行id:" + executeId + "app相关信息:" + linkResponse);
    }

    @Override
    public void threadErrorEvent(String executeId, LinkResponse linkResponse) {
        log.info("执行id:" + executeId + "异常信息:" + linkResponse);
    }
}
